package org.zsk.cs.algorithnm;

/**
 * @author zsk
 * 2021/2/27 下午5:32
 */
import java.util.*;
public class Main2{
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        int k=Integer.parseInt(in.nextLine());
        String line2=in.nextLine();
        String[] line2Data=line2.split("-");

        if (line2Data.length>1){
            
        }
        String optStr="";
        StringBuilder newStr= new StringBuilder(line2Data[0]);
        for (int i=1;i<line2Data.length;i++){
            optStr+=line2Data[i];
        }
        String leaveStr=optStr;
        while (leaveStr.length()>k){
            String curStr=leaveStr.substring(0,k);
            char[] curChar2=curStr.toCharArray();
            leaveStr=leaveStr.substring(k);
            int count=0;
            int letterCount=0;
            boolean isUpper=false;
            for (int j=0;j<curChar2.length;j++){
                if (!Character.isLetter(curChar2[j])){
                    continue;
                }
                letterCount++;
                if (Character.isUpperCase(curChar2[j])){
                    count++;
                }
                if (2*count>letterCount){
                    isUpper=true;
                }
            }
            if (count==letterCount/2){
                newStr.append("-").append(curStr);
            }else {
                if (isUpper){
                    newStr.append("-").append(curStr.toUpperCase());
                }else {
                    newStr.append("-").append(curStr.toLowerCase());
                }
            }

        }

        char[] curChar=leaveStr.toCharArray();
        int count=0;
        int letterCount=0;
        boolean isUpper=false;
        for (int j=0;j<curChar.length;j++){
            if (!Character.isLetter(curChar[j])){
                continue;
            }
            letterCount++;
            if (Character.isUpperCase(curChar[j])){
                count++;
            }
            if (2*count>letterCount){
                isUpper=true;
            }
        }
        if (count==letterCount/2){
            newStr.append("-").append(leaveStr);
        }else {
            if (isUpper){
                newStr.append("-").append(leaveStr.toUpperCase());
            }else {
                newStr.append("-").append(leaveStr.toLowerCase());
            }
        }
        System.out.println(newStr);

    }

}
